﻿using UnityEngine;
using UnityEngine.EventSystems;

namespace HKTools
{
    /// <summary>
    /// 视频播放上的提示标签
    /// </summary>
    public class HK_TipCtrl : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
    {
        GameObject tip;

        void Awake()
        {
            tip = transform.Find("Tip").gameObject;
        }

        void Start()
        {
            tip.SetActive(false);
        }

        public void OnPointerEnter(PointerEventData eventData)
        {
            tip.SetActive(true);
        }

        public void OnPointerExit(PointerEventData eventData)
        {
            tip.SetActive(false);
        }
    }
}